#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

signed main() {
	int ret = 0x3f3f3f3f;
	for(int i = 1; i <= 7; i ++ ) {
		int x;
		cin >> x;
		ret = min(ret, x);
	}
	cout << ret << endl;
	return 0;
}

